package com.tianyi.sfzy1.mapper;

import com.tianyi.sfzy1.domain.Privatemessage;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【privatemessage(私信表)】的数据库操作Mapper
* @createDate 2025-01-02 11:46:53
* @Entity com.tianyi.sfzy1.domain.Privatemessage
*/
public interface PrivatemessageMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Privatemessage record);

    int insertSelective(Privatemessage record);

    Privatemessage selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Privatemessage record);

    int updateByPrimaryKey(Privatemessage record);

    //插入用户提问的问题和相关信息
    int insertQuestion(Privatemessage privatemessage);

    //根据会员编号和咨询师编号查询私信列表
    List<Privatemessage> selectMessage(int consultantId);

    //根据咨询师编号查询私信列表
    List<Privatemessage> selectById(int consultantId);

    //根据咨询师编号查询私信列表(分页)
    List<Privatemessage> selectById2(int consultantId,int pageNum,int pageSize);

    //根据id修改回复内容
    int updateAnswer(int messageId,String replyContent);

    //根据id删除私信
    int deleteMessage(int messageId);

    //根据用户姓名和咨询师id查询私信列表(模糊查询)
    List<Privatemessage> selectByUsername666(String realname,int consultantId);

    //根据私信id删除私信信息(批量删除)
    int deleteMessageByIds(List<Integer> messageId);

    //根据咨询师id查询私信的数量
    int selectCount2(int consultantId);
}
